<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

//后台首页
Route::get('/admin/','Admin\IndexController@index');


//后台用户管理     url地址           根目录为controller
Route::controller('/admin/user','Admin\UserController');

//后台分类管理
Route::controller('/admin/cate','Admin\CateController');

//后台商品管理
Route::controller('/admin/goods','Admin\GoodsController');

//后台订单管理
Route::controller('/admin/order','Admin\OrderController');

//前台book首页
Route::controller('/home/book','Home\BookController');

//前台cartoon首页
Route::controller('/home/cartoon','Home\CartoonController');


//商品详情
Route::controller('/home/goods','Home\GoodsController');

//购物车添加操作
Route::get('/cart/insert','Home\CartController@insert');
Route::get('/cart/index','Home\CartController@index');
Route::get('/cart/clear','Home\CartController@clear');
Route::get('/cart/delete','Home\CartController@delete');
Route::post('/cart/update','Home\CartController@update');

//订单详情
Route::controller('/home/order','Home\OrderController');
// 地址添加
Route::post('/address/insert','Home\AddressController@insert');












//后台评论添加操作
Route::post('/view/insert','Admin\ReviewController@insert');

//后台评论列表
//Route::post('/admin/review','Admin\ReviewController');


//前台评论
Route::get('/review/{id}','Home\ReviewController@review');

//商品详情

Route::get('/show/{gid}','Home\GoodsController@show');

